//
// Created by Administrator on 2024/3/11.
//

#include<bits/stdc++.h>

using namespace std;
int data[200000 + 500], head = 0, tail = -1;

int main() {
    int n;
    cin >> n;
    for (int i = 0; i < n; i++)cin >> data[i];
    head = 0;
    tail = n - 1;


    while (head <= tail) {
        cout << data[head] << " ";
        ++head;
        if (head <= tail) {
            int h = data[head];
            ++head;
            data[++tail] = h;
        }


    }
    return 0;
}